package com.huashi.dealer.modular.business.goods.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.huashi.dealer.commonEntity.Goods;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * Store端商品列表VO
 *
 * @author 谭陈强
 * @since 2025-08-07
 */
@Data
@Schema(description = "Store端商品列表VO")
public class StoreGoodsListVo{

    /**
     * 商品ID
     */
    @Schema(description = "商品ID")
    private Long goodsId;
    /**
     * 商品详情
     */
    @Schema(description = "商品详情")
    private String content;
    /**
     * 商品名称
     */
    @Schema(description = "商品名称")
    private String goodsName;

    /**
     * 商品图片
     */
    @Schema(description = "商品图片")
    private List<GoodsImageVo> image;

    /**
     * 商品分类
     */
    @Schema(description = "商品分类")
    private CategoryVo category;

    /**
     * 实际销量
     */
    @Schema(description = "实际销量")
    private Integer salesActual;

    /**
     * 商品排序
     */
    @Schema(description = "商品排序")
    private Integer goodsSort;

    /**
     * 商品状态
     */
    @Schema(description = "商品状态")
    private GoodsStatusVo goodsStatus;

    /**
     * 是否新品
     */
    @Schema(description = "是否新品")
    private GoodsStatusVo isNewproduct;

    /**
     * 是否爆款
     */
    @Schema(description = "是否爆款")
    private GoodsStatusVo isHotsellingitem;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 商品图片VO
     */
    @Data
    @Schema(description = "商品图片VO")
    public static class GoodsImageVo {
        /**
         * 图片ID
         */
        @Schema(description = "图片ID")
        private Long imageId;

        /**
         * 文件路径
         */
        @Schema(description = "文件路径")
        private String filePath;
    }

    /**
     * 商品分类VO
     */
    @Data
    @Schema(description = "商品分类VO")
    public static class CategoryVo {
        /**
         * 分类ID
         */
        @Schema(description = "分类ID")
        private Long categoryId;

        /**
         * 分类名称
         */
        @Schema(description = "分类名称")
        private String name;
    }

    /**
     * 商品状态VO
     */
    @Data
    @Schema(description = "商品状态VO")
    public static class GoodsStatusVo {
        /**
         * 状态值
         */
        @Schema(description = "状态值")
        private Integer value;

        /**
         * 状态文本
         */
        @Schema(description = "状态文本")
        private String text;
    }
}
